﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SweeperPrototype.Objects;

namespace SweeperPrototype.Plumbing
{
    public interface IListLink<LHS, RHS> 
    {
        INotifyList<LHS> SourceList { get;  }
        INotifyList<RHS> ResultList { get; }
    }

    public class ListLink<LHS,RHS> : IListLink<LHS,RHS>
    {
        protected readonly INotifyList<LHS> m_SourceList;
        protected readonly NotifyList<RHS> m_ResultList;
        
        protected ListLink( INotifyList<LHS> source_list, 
            out NotifyList<RHS> result_list )
        {
            m_SourceList = source_list;
            result_list = m_ResultList = new NotifyList<RHS>();//result_list;
        }

        public INotifyList<LHS> SourceList
        {
            get { return m_SourceList; }
        }

        public INotifyList<RHS> ResultList
        {
            get { return m_ResultList; }
        }
    }
}
